<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>文献资源管理系统-套订单模板</title>
<link rel="icon" href="favicon.ico" type="image/ico">
<meta name="keywords" content="文献资源管理系统-套订单模板">
<meta name="description" content="文献资源管理系统-套订单模板">
<meta name="author" content="yinqi">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/materialdesignicons.min.css" rel="stylesheet">
<link href="css/style.min.css" rel="stylesheet">
</head>
  <style>
    .col-lg-12{
      margin: auto;
    top: 17px;
    left: 0;
    bottom: 0;
    right: 0;
    position: absolute;
    }
  </style>
<body>
<div class="lyear-layout-web" id="app">
  <div class="lyear-layout-container">
    <!--左侧导航-->

    <!--End 左侧导航-->
    
    <!--头部信息-->
 
    <!--End 头部信息-->
    
    <!--页面主要内容-->

    <main class="lyear-layout-content" >
      <div class="container-fluid">
        
        <div class="row">
          <div class="col-lg-12" >
            <div class="card">
              <div class="card-toolbar clearfix">
                <form class="pull-right search-bar" method="get" action="#!" role="form">
                  <div class="input-group">
                    <div class="input-group-btn">
                      <input type="hidden" name="search_field" id="search-field" value="title">
                      <button class="btn btn-default dropdown-toggle" id="search-btn" data-toggle="dropdown" type="button" aria-haspopup="true" aria-expanded="false">
                        订购号 <span class="caret"></span>
                      </button>
                    </div>
                    <input type="text" class="form-control" v-model="covername.orderCoverNumber" v-on:keyup="getlist(1)" name="keyword" placeholder="请输入名称">
                  </div>
                </form>
                <div class="toolbar-btn-action">
                  <h4>套订单</h4>
                </div>
              </div>
              <div class="card-body">
                <div class="table-responsive" >
                  <table class="table table-bordered">
                    <template>
                      <el-table
                        v-loading="loading"
                        element-loading-text="拼命加载中"
                        :data="list"
                        style="width: 100%"  >
                    <el-table-column type="selection" width="65"></el-table-column>
                        <el-table-column
                          prop="orderCoverNumber"
                          label="订购号">
                        </el-table-column>
                        <el-table-column
                          prop="coverName"
                          label="套题名">
                        </el-table-column>
                      <el-table-column
                          prop="plssn"
                          label="ISSN">
                          <template slot-scope="scope">
                            <span>{{scope.row.plssn}}/{{scope.row.eissn}}</span>
                         </template>
                        </el-table-column>
                        <el-table-column
                          prop="pisbn"
                          label="ISBN">
                          <template slot-scope="scope">
                            <span>{{scope.row.pisbn}}/{{scope.row.elsbn}}</span>
                         </template>
                        </el-table-column>
                        <el-table-column
                        prop="country"
                        label="出版国">
                      </el-table-column>
                        <el-table-column
                        prop="publishname"
                        label="出版社">
                      </el-table-column>
                      <el-table-column
                      prop="organ"
                      label="成员单位">
                    </el-table-column>
                    <el-table-column
                    prop="subject"
                    label="学科">
                  </el-table-column>
                  <el-table-column
                  prop="cmorphology"
                  label="载体">
                </el-table-column>
                  </el-table-column>
                  <el-table-column
                  prop="language"
                  label="语种">
                </el-table-column>
                  <el-table-column
                  prop="cmorphology"
                  label="载体">
                </el-table-column>
                  </el-table-column>
                  <el-table-column
                  prop="language"
                  label="语种">
                </el-table-column>
                 <el-table-column
                  prop="aogeMoney"
                  label="到货价格">
                </el-table-column>
                <el-table-column
                prop="orderPay"
                label="支付价格">
              </el-table-column>
              <el-table-column
              prop="contiunedStatus"
              label="是否停订">
              <template slot-scope="scope">
                <span>{{config2.gzdStateList[scope.row.contiunedStatus]}}</span>
             </template>
            </el-table-column>
            <el-table-column
            prop="orderYear"
            label="订购年">
          </el-table-column>
          <el-table-column
          prop="orderType"
          label="订购类型">
          <template slot-scope="scope">
            <span>{{config.gzdStateList[scope.row.orderType]}}</span>
         </template>
        </el-table-column>
       
                      </el-table>
                    </template>
                  </table>
                </div>

                <nav>
                  <ul class="pagination pagination-circle">
                    <li class="active"><a>{{totals}}</a></li>
                    <li>
                      <a type="button" @click="getlist(prePage)">
                        <span><i class="mdi mdi-chevron-left" ></i></span>
                      </a>
                    </li>
                    <li ><a>{{currentPage}}</a></li>
                    <li>
                      <a type="button" @click="getlist(nextPage)">
                        <span><i class="mdi mdi-chevron-right"></i></span>
                      </a>
                    </li>
                  </ul>
                </nav>  

              </div>
            </div>
          </div>
          
        </div>
        
      </div>
      
    </main>
    <!--End 页面主要内容-->
  </div>
</div>

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>

<script src="https://cdn.bootcss.com/vue/2.6.9/vue.min.js"></script>
<script src="https://cdn.bootcss.com/axios/0.19.0/axios.min.js"></script>

<!-- 引入样式 -->
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<!-- 引入组件库 -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script type="text/javascript">
$(function(){
    $('.search-bar .dropdown-menu a').click(function() {
        var field = $(this).data('field') || '';
        $('#search-field').val(field);
        $('#search-btn').html($(this).text() + ' <span class="caret"></span>');
    });
});
</script>
</body>

<script>
  new Vue({
    el:"#app",
    data:{
      config :{
        gzdStateList: {
            1: '新增',
            2: '续订',
            3: '停订',
            4: '拟续停订新单',
            },  
    },
    config2 :{
        gzdStateList: {
            0: '否',
            1: '是',
            },  
    },
    config3 :{
        gzdStateList: {
            0: '未订到',
            1: '订到',
            },  
    },
    config4 :{
        gzdStateList: {
            0: '未到货',
            1: '到货',
            },  
    },
      list:[],
      loading: false,
      covername:{},
      currentPage:1, //当前页码
      size:5, 
      totals:"",
      prePage:1,
      nextPage:1,
      totalPage:1, //总页数

      sels: [],//选中显示的值
      selsadd: [],//选中显示的值
      selsup: [],//选中显示的值

      cover:{},
      covers:{},
      orders:{},
      order:{
        orderPay:"0.0",
        aogeMoney:"0.0"
      },
      language:{},  //语种
      cmorphology:{},//载体
      subject:{},//学科
      organ:{},//单位
      country:{},//国家
      literature:{},//文献
    },
    created () {
        this.getlist(1);
    },
    methods: {
      getlist(currentPage){
        this.loading=true;
      setTimeout(() => {
      this.loading = false;

      axios.post("http://29n01o8660.oicp.vip/server/findcoverVoauditpasslikename/"+this.currentPage+"/"+this.size,this.covername)
      .then(res => {
        this.list = res.data.data.rows;
        this.totals = res.data.data.total;
        this.currentPage = currentPage;
        this.totalPage = Math.ceil(this.totals/this.size);
        this.prePage = 
        currentPage>1?currentPage-1:currentPage;
        this.nextPage = currentPage<this.totalPage?currentPage+1:currentPage;
        console.log(res)
      })
      .catch(err => {
        console.error(err); 
      })

       }, 2000);

      },
    //   selsChange(sels) {      
    //     //被选中的行组成数组 
    //     this.sels = sels;
    //     // alert(JSON.stringify(this.sels))
    //     //遍历被选中行数所组成的数组
    //     for(let element of this.sels){
    //     //如果视频正在转码或者等待转码,禁用按钮,结束方法
    //       if(element.status == 'waiting'||element.progress){
    //         this.disabled = true;
    //         return;
    //       }
    //          //如果没有视频正在转码或者等待转码,按钮可用
    //         this.disabled = false;
    //     }
    // },
    // auditpass(rows){  //批量审核 通过
    //   var ids = [];
    //   //alert(JSON.stringify(rows))
    //   rows.forEach(element =>{
    //     ids.push(element.id)
    //   })
    //   alert(ids)
    //   this.$confirm('确定要审核通过选中的文件吗?','提示').then(() =>{
    //     axios.get("http://29n01o8660.oicp.vip/server/coversbulkauditpass/"+ids)
    //     .then(res => {
    //       this.loading = true;
    //     setTimeout(() => {
    //       this.loading = false;

    //       this.$message({
    //       message: '恭喜你，批量审核通过成功',
    //       type: 'success'
    //        });

    //       }, 2000);

    //       this.getlist(1);
    //       console.log(res)
    //     })
    //     .catch(err => {
    //       console.error(err); 
    //     })
    //   }).catch(()=>{});
    // },
    // auditturn(rows){  //批量审核 驳回
    //   var ids = [];
    //   //alert(JSON.stringify(rows))
    //   rows.forEach(element =>{
    //     ids.push(element.id)
    //   })
    //   alert(ids)
    //   this.$confirm('确定要驳回选中的文件吗?','提示').then(() =>{
    //     axios.get("http://29n01o8660.oicp.vip/server/coversbulkauditturn/"+ids)
    //     .then(res => {
    //       this.loading = true;
    //     setTimeout(() => {
    //       this.loading = false;

    //       this.$message.error('恭喜你，批量驳回成功!!');

    //       }, 2000);

    //       this.getlist(1);
    //       console.log(res)
    //     })
    //     .catch(err => {
    //       console.error(err); 
    //     })
    //   }).catch(()=>{});
    // },
    }
  })
</script>
</html>